#ifndef ALIYUN_DEFAULT_PROFILE_H_
#define ALIYUN_DEFAULT_PROFILE_H_

#include <vector>
#include "core/profile/i_client_profile.h"
#include "core/regions/end_point.h"

namespace aliyun {

class DefaultProfile : public IClientProfile {
public:
  static DefaultProfile* GetProfile(const string& region_id, const string& access_key_id, const string& access_secret);
  static void ReleaseProfile(DefaultProfile *default_profile);

private:
  DefaultProfile(const string& region_id, const Credential& credential);
  ~DefaultProfile();

public:
  virtual ISigner* GetSigner(void);
  virtual const string& GetRegionId(void);
  virtual const string& GetFormat(void);
  virtual Credential& GetCredential(void);

  static std::vector<Endpoint>& GetEndpoints(void);

  static void AddEndpoint(const string& endpoint_name,
    const string& region_id, const string& product, const string& domain);

  static Endpoint* FindEndpointByName(const string& endpoint_name);

private:
  string region_id_;
  Credential credential_;
  ISigner *i_signer_;
  string accept_format_;
};

} // namespace aliyun {

#endif // #ifndef ALIYUN_DEFAULT_PROFILE_H_

// end of file
